from django.conf.urls import url
from apps.users import views

urlpatterns = [
    # 注册
    url(r'^register/$', views.RegisterView.as_view(), name='register'),
    url(r'^usernames/(?P<username>[a-zA-Z0-9_-]{5,20})/count/$', views.UsernameView.as_view(), name='usernamecount'),
    url(r'^mobiles/(?P<mobile>1[3-9]\d{9})/count/$', views.MobileCountView.as_view(), name='mobilecount'),
    url(r'^login/$', views.LoginView.as_view(), name='login'),
    url(r'^logout/$', views.LogoutView.as_view(), name='logout'),
    url(r'^user_center_info/$', views.UserInfoView.as_view(), name='userinfo'),
    url(r'^emails/$', views.EmailView.as_view(), name='email'),
    url(r'^emails/verification/$', views.VerifyEmailView.as_view(), name='email_code'),
    url(r'^browse_histories/$', views.UserBrowseHistory.as_view(), name='history'),
    url(r'^order/info/(?P<page_num>\d+)/$', views.UserOrderView.as_view(), name='orderinfo'),
    url(r'^find_password/$', views.ChangePWDView.as_view(), name='changepwd'),
    url(r'^accounts/(?P<username>[a-zA-Z0-9_-]{5,20})/sms/token/$', views.ChangePWDOneView.as_view(), name='CPWDFir'),
    url(r'^accounts/(?P<username>[a-zA-Z0-9_-]{5,20})/password/token/$', views.ChangePWDTwoView.as_view(), name='CPWDSec'),
    url(r'^users/(?P<user_id>\d+)/password/$', views.ChangePWDThreeView.as_view(), name='CPWDFin'),
    url(r'^orders/comment/$', views.OrderCommentView.as_view(), name='ordercomment'),

]
